package com.solcoo.dao;

import java.sql.SQLException;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.solcoo.pojo.MerchantType;

@Repository
public class MerchantTypeDao {

	@Resource
	private SqlMapClient sqlMapClient;
	
	public List<MerchantType> getList() throws SQLException {
		return sqlMapClient.queryForList("getList");
	}

	public boolean add(MerchantType mt) throws SQLException {
		sqlMapClient.insert("addMerchantType", mt);
		if(mt.getId() > 0){
			return true;
		} else {
			return false;
		}
	}
}